<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title><php>echo empty($page_title) ? C('WEB_SITE_TITLE') : $page_title;</php></title>
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <link rel="shortcut icon" href="{:SITE_URL}/favicon.ico">
    
    <script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
</head>
<body style="text-align: center;">
	<img id="qrcode" style="width: 200px; margin-top: 100px;" alt="正在加载二维码..." _src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='>
	
	<script type="text/javascript">
		var get_temp_ticket_url = "{:addons_url('Scratch://Scratch/getTempTicket', array('scene_id' => $scene_id, 'token' => $token))}";
		
		var qrcode = document.getElementById('qrcode');
		
		$.get(get_temp_ticket_url, function(data) {
			if(data.status) {
				qrcode.src = qrcode.getAttribute('_src') + data.info;
			} else {
				alert('无法获取二维码，请刷新页面重试...');
			}
		}, 'json');
	</script>
</body>
</html>